<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/3/27
 * Time: 17:50
 */

namespace app\index\controller;


use think\Controller;
use think\Db;
use think\Request;

class MemberInfo extends Controller
{
    # 商户id
    public $bizId;

    /**
     * OrderInfo constructor.
     * @param Request|null $request
     */
    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        header('Access-Control-Allow-Origin:*');  //支持全域名访问，不安全，部署后需要固定限制为客户端网址
        header('Access-Control-Allow-Methods:POST,GET,OPTIONS,DELETE'); //支持的http 动作
        header('Access-Control-Allow-Headers:Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Authorization , Access-Control-Request-Headers');  //响应头 请按照自己需求添加。
        if (strtoupper($_SERVER['REQUEST_METHOD']) == 'OPTIONS') {
            exit;
        }
        $header = apache_request_headers();
        $this->bizId = $header['coo_id'];// 门店id
    }
}